package com.jumi.microservice.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jm.member.common.core.utils.DelFlag;
import com.jumi.microservice.entity.JmQrcode;
import com.jumi.microservice.mapper.JmQrcodeMapper;
import com.jumi.microservice.service.IJmQrcodeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.awt.geom.QuadCurve2D;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 要挑客户管理团队
 * @since 2020-08-27
 */
@Service
public class JmQrcodeServiceImpl extends ServiceImpl<JmQrcodeMapper, JmQrcode> implements IJmQrcodeService {

    @Override
    public JmQrcode getQrcodeByUid(Integer uid) {
        QueryWrapper wrapper=new QueryWrapper();
        wrapper.eq("uid",uid);
        return getOne(wrapper);
    }

    @Override
    public JmQrcode getUserQrcode(Integer uid) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("is_del", DelFlag.normal);
        wrapper.eq("uid",uid);
        wrapper.ne("show_type",2);   //付邮领不展示
        return getOne(wrapper);
    }


}
